home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 2).iso / 0746 / integr.txt < prev    next >
Text File  |  1997-04-09  |  13KB  |  339 lines

  1. Specifications for DocView Integration with external databases.
  2.  
  3. (Informatik Inc. has available several utilities for special requirements,
  4. such as direct printing, scanning, batch conversions, etc.  If you are looking 
  5. for special functions that are not included in DocView, pleasse contact 
  6. Informatik Inc.)
  7.  
  8. The following setup is required to integrate the external database with DocView:
  9.  
  10. An earlier version of DocView required a SETUP.SSU file.  This file has now 
  11. been replaced by the Docview.ini file.  The setup is done via the Setup menu.
  12.  
  13. Images can be viewed via the DocView program by a DOCVIEW.EXE FILENAME.XXX command 
  14. (where FILENAME.XXX is the path name of the image file.  DocView can also 
  15. be launched from many Windows applications, such as internet browsers.
  16.  
  17. The recommended interface is with DDE (Dynamic Data Interchange).  If your 
  18. database application does not support DDE, the interface can be accomplished 
  19. with the SendKeys method.  For details on the SendKeys method, please read the 
  20. section below.
  21.  
  22.  
  23. USING THE DDE METHOD -  THE RECOMMENDED METHOD
  24. **********************************************
  25.  
  26.  
  27. Example of a SETUP (for MSACCESS 2.0  DATABASE)
  28. --------------------------------------------------------
  29.  
  30. Database Editing Sub-System:
  31.  
  32.     DDE Topic:
  33.         MSAccess|EditForm
  34.     DDE Item:
  35.         TheField
  36.     SendKeys String:
  37.         ====leave this line blank----
  38.  
  39. Database Query Sub-System:
  40.  
  41.     DDE Topic:
  42.         MSAccess|QueryForm
  43.     DDE Item:
  44.         TheField
  45.     SendKeys String:
  46.         ====leave this line blank====
  47.  
  48. Optional Fixed Path:
  49.  
  50.     D:\DOCS
  51.  
  52. Image Windows Width:
  53.  
  54.     60
  55.  
  56. Image Windows Height:
  57.  
  58.     60
  59.  
  60. Image Windows State/Position:
  61.  
  62.     0
  63.  
  64. Items 1-3 contain information about the external database's EDITING subsystem:
  65.      Item 1 is the DDE TOPIC (in the MS Access database system).
  66.      Item 2 is DDE ITEM (in the MS Access database system).
  67.      Item 3 (leave this line blank)
  68.  
  69. Items 4-6 contain information about the external database's QUERY subsystem:
  70.      Item 4 is the DDE TOPIC (in the MS Access database system).  
  71.      Item 5 is DDE ITEM (in the MS Access database system). 
  72.      Iteme 6 (leave this line blank)
  73.  
  74. Item 7 (optional) specifies the fixed path name of the directory that holds 
  75.      the image files. This is required only if the image address in the 
  76.      database does not include the directory name.
  77.  
  78. Item 8 (optional) specifies the path substitution.  An equal number of leading 
  79.      letters of the path passed by the DDE parameter will be substituted.  To 
  80.      specify the number of characters to be replaced, add the number after a 
  81.      space, for example C:\AAA 9
  82.  
  83. Item 9 specifies the opening state of the parent (MDI) window:  
  84.       blank or 0 = normal, full screen size
  85.       1 = minimized
  86.       2 = maximized
  87.       3 = Fit-to-image, upper-left corner
  88.       x=nnnn y=nnnn will offset the window from the left and the top
  89.                    by the nnnn values, e.g x=1440 y = 720 will place 
  90.                    the window 1 inch from the left and 0.5 inches from the 
  91.                    top.  The window is sized to fit the image.
  92.  
  93.       x=right y=bottom will place the window at the absolute right and/or bottom of
  94.                    the screen.   
  95.   
  96. Item 10 specifies the width of the image display window.  If the value is 2, 
  97.      the window opens maximized, otherwise, if the value is 100 or less, 
  98.      the entry represents a percentage of the screen width.  If more than 100 
  99.      it represents the measurement in twips  (1440 twips = 1 inch; 576 twips = 1 cm).
  100.  
  101. Item 11 is the height of the image display window. If the value is 100 or less,
  102.       the entry represents a percentage of the available screen height, otherwise
  103.       it is measured in twips  (1440 twips = 1 inch; 576 twips = 1 cm).
  104.  
  105. item 12 represents the list of magnification ratios that you want to see in the 
  106.      Magnification menu, for example 25,50,100,150,200,300
  107.  
  108.  
  109. Item 13 represents other options:
  110.       nosave = the Save As option in the image windows is suppressed
  111.       printall = the default is set to print ALL pages.
  112.  
  113.       If you use several options, separate the options with a comma or a space.
  114.  
  115. Item 14 specifies the left and top margin for the purpose of printing (inches or 
  116.       centimeters depending on the Windows setup)
  117.  
  118. In the database application, you must create a script or a function for a 
  119. DDE POKE. Use the following specifications:
  120.  
  121.    Application = Docview
  122.    Topic = Linkform
  123.    Item  = Linkbox 
  124.  
  125.    EXAMPLE OF A CODE IN THE MS ACCESS APPLICATION:
  126.    -----------------------------------------------
  127.    Sub TheButton_Click()  'executed when the user clicks on the TheButton.
  128.        Dim Chan as integer
  129.        Dim x as integer
  130.        Dim param as string
  131.        On error resume next
  132.        param = [TheField]
  133.        Chan = DDEInitiate("Docview","Linkform")  ' Establish a DDE link
  134.        if err <> 0 then    ' if DocView is not yet running  .....
  135.            x = shell("C:\docview\docview.exe " & param,3)   'start up Docview. (Space after 'exe'!)
  136.        else
  137.            DDEPoke Chan, "Linkbox", param   'Poke the data to DocView
  138.            DDETerminateAll   'Close the DDE link
  139.        endif
  140.    End Sub
  141.  
  142.    (Where param represents the parameter sent to DocView.) 
  143.  
  144.    EXAMPLE OF A CODE IN AN VISUAL BASIC APPLICATION 
  145.    ------------------------------------------------
  146.    Sub Command1_Click ()
  147.        On Error Resume Next
  148.        ddelink.LinkMode = 0
  149.        ddelink.LinkTopic = "Docview|Linkform"
  150.        ddelink.LinkItem = "Linkbox"
  151.        ddelink.LinkMode = 2
  152.        If Err = 282 Then
  153.            dummy = Shell("c:\docview\install\docview.exe ddddddd", 1)           
  154.        else
  155.            ddelink.Caption = ddddddd
  156.            ddelink.LinkPoke
  157.            ddelink.LinkMode = 0
  158.        endif
  159.    End Sub
  160.  
  161.    (Where ddddddd represents the parameter sent to DocView.)
  162.  
  163. The database application will send (poke) the following data string to DocView:
  164.  
  165.    ffffffff,ttttttttt
  166.    ffffffff,ttttttttt
  167.    ffffffff,ttttttttt
  168.  
  169.    where fffffff is the file name (with path and extension), and
  170.          ttttttt is the optional title (description) of the image.
  171.  
  172.    The title, if used, will be displayed in the title bar of the image.
  173.  
  174.    Up to 30 items can be listed.
  175.  
  176. Please refer to the database application's user guide for the DDE syntax.
  177.  
  178.  
  179. Sending data from DocView to the database application
  180. -----------------------------------------------------
  181.  
  182. When the user clicks on the Edit button (pencil) or the Query button (question 
  183. marks) in the toolbar of DocView, DocView pokes the file name of the currently 
  184. displayed image to the database application.  The information is sent to the 
  185. form and field specified in the setup (items 1,2 and 4,5, see above).
  186. In the database application, you need to write the appropriate code to handle 
  187. the poked data.
  188.  
  189. (VB Programmers please note:  The 'receiving' form must have the linkmode set 
  190. to 1  and the linktopic must agree with the topic specified in the setup.) 
  191.  
  192.  
  193.  
  194.  
  195.  
  196. For support,  contact Informatik Inc. at 610.640.0339 or support@informatik.com.
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ****************************************************************
  203. ****************************************************************
  204.  
  205.  
  206. (If you use the DDE method, ignore the following section.)
  207.  
  208.  
  209.  
  210. THE 'SENDKEYS METHOD'  
  211. *********************
  212.  
  213.  
  214.  
  215. **************************************************************************
  216.  
  217. Method B (using SendKeys function)
  218. ----------------------------------
  219.  
  220. C:\ACCESS\MSACCESS.EXE C:\DBDIR\MYDB.MDB
  221. Microsoft Access
  222. %(FU)DVMACRO1{ENTER}
  223. C:\ACCESS\MSACCESS.EXE C:\DBDIR\MYDB.MDB
  224. Microsoft Access
  225. %(FU)VDMACRO2{ENTER}
  226. D:\DOCS
  227. 7200
  228. 6000
  229. 2
  230.  
  231. Items 1-3 contain information about the external database's EDITING subsystem:
  232.      Item 1 is the path/file name of the external database application.
  233.            If you do not integrate, enter 'None'.
  234.      Item 2 is the precise name of the external database application as 
  235.           shown in its title bar.  If you don not integrate, enter 'None'.
  236.      Item 3 represents the 'SendKeys' string for activating the external 
  237.           database application (more information below).
  238.  
  239. Items 4-6 contain information about the external database's QUERY subsystem:
  240.      Item 4 is the path/file name of the external database application.
  241.           If you do not integrate, enter 'None'.
  242.      Item 5 is the precise name of the external database application as 
  243.           shown in its title bar.  If you don not integrate, enter 'None'.
  244.      Item 6 represents the 'SendKeys' string for activating the external 
  245.           database application (more information below).
  246.  
  247. Item 7 (optional) specifies the fixed path name of the directory that holds 
  248.      the image files. This is required only if the image address in the 
  249.      database does not include the directory name.
  250.  
  251. Item 8 is the width of the image display window.  If the value is 100 or less,
  252.       the entry represents a percentage of the screen width, otherwise it is
  253.       measured in twips  (1440 twips = 1 inch; 576 twips = 1 cm).
  254. Item 9 is the height of the image display window. If the value is 100 or less,
  255.       the entry represents a percentage of the available screen height, otherwise
  256.       it is measured in twips  (1440 twips = 1 inch; 576 twips = 1 cm).
  257.  
  258. Item 10 specifies the window status:  
  259.       blank or 0 = normal
  260.       2 = maximized
  261.       1 = minimized
  262.      
  263. **************************************************************************
  264.  
  265. The characters are not case sensitive, except possibly item 3 and item 6.
  266.  
  267. Items 1 and 2 and items 4 and 5 may (but need not necessarily) be identical.
  268.  
  269.  
  270. In the database application, you must create a 'SendKeys' script or function.
  271.  
  272. If you use the 'SendKeys' link method, read and follow the instructions below:
  273.  
  274. In the external database application, you must create a script/macro that copies 
  275. the following data to the Windows clipboard, activates DocView and send 
  276. the F12 keystroke to DocView.
  277.  
  278. #F#xxxxxxxx.xxx,tttttttttt
  279. xxxxxxxx.xxx,tttttttttt
  280. xxxxxxxx.xxx,tttttttttt
  281.  
  282. Where #F# is a fixed starter tag,
  283. xxxxxxxxxx.xxx is the file name of the image.  
  284.     The directory path must be included unless it is declared 
  285.     in the third box of the SETUP (see above).  
  286. tttttttttt is the optional description of the file that will be used in the 
  287.     image displays title bar.  If the tttttttttt is blank, the system 
  288.     uses the file name as a description.  If the tttttttttt is not used, 
  289.     the comma can be omitted.   
  290.  
  291. Normally, you will only have one line, one file. If you specify multiple lines, 
  292. the DocView program can display all the listed images in sequence by pressing 
  293. a 'Next' button.
  294.  
  295. As an example, a macro in Access 2.0 that sends the following keysstrokes 
  296. (SendKeys) will activates DocView:
  297. ^({ESC})<{Enter}{F12}
  298.     
  299.     
  300. When the DocView user requests the external application's EDIT Form,  DocView 
  301. copies a #E#xxxxxxxx.xxx string to the Windows clipboard, starts up or activates 
  302. the external application specified in items 1 and 2 and send the keystrokes 
  303. specified in item 3 of the setup specification to the external edit application. The 
  304. xxxxxxxx.xxx parameter represents the path/file name of the currently active 
  305. image in DocView.  If item 7 of the SETUP specifies a global directory path, 
  306. the matching path is removed from the parameter.  The #E# is an identifier flag.  
  307. The SendKeys keystrokes would normally include the commands for executing a 
  308. macro in the external database application that will pick up the image file name 
  309. in the Windows Clipboard and process it.
  310.  
  311. When the DocView user requests the external application's QUERY Form,  DocView 
  312. copies a #Q#xxxxxxxx.xxx string to the Windows clipboard, starts up or activates 
  313. the external application specified in items 4 and 5 and send the keystrokes 
  314. specified in item 6 of the setup specification file to the external edit application. The 
  315. xxxxxxxx.xxx parameter represents the path/file name of the currently active 
  316. image in DocView.  If item 7 of the setup specifies a global directory path, 
  317. the matching path is removed from the parameter.  The #E# is an identifier flag.  
  318. The SendKeys keystrokes would normally include the commands for executing a 
  319. macro in the external database application that will pick up the image file name 
  320. in the Windows Clipboard and process it.
  321.  
  322.  
  323. SendKeys
  324.  
  325. In the example above, the %(FU)VDMACRO1{ENTER} has the following meaning:
  326. After opening the external application, the system sends the F and U keystrokes, 
  327. both while pressing the Alt key (as symbolized by the percent sign).  The F open 
  328. the File menu and the U opens the Macro Request.  The letters V D M A C R O 1  are 
  329. sent followed by the Enter key.  VDMACRO1 is the assumed macro name (it can of course  
  330. be any name). For more details on the SendKeys syntax, please consult the application's 
  331. documentation, or contact Informatik Inc.
  332.  
  333.  
  334. *************************************************************************************
  335.  
  336.  
  337. For support,  contact Informatik Inc. at 610.640.0339 or support@informatik.com.
  338.  
  339.